Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Increase initial lock duration for wsgc WEB-229 #17387

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Apr 26, 2023

Description

We're observing mike-marcacci/node-redlock#168 in prod instances. The fix is to increase the initial duration, or downgrade to 4.2. Given 4.2 has a different API syntax, and isn't in TypeScript, let's try this fix first.

Related Issue(s)

Fixes #

How to test

Documentation

Preview status

gitpod:summary

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • analytics=segment
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

/hold

@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 26, 2023
try {
await this.mutex.client().using(["workspace-gc"], 30 * 1000, async (signal) => {
await this.mutex.client().using(["workspace-gc"], initialLockDuration, async (signal) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative reasonable value would be the actual frequency at which we plan to run the job. The lock is auto-released once the function completes, so it shouldn't be an issue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've actually applied that change, as it makes more sense

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@easyCZ
Copy link
Member Author

easyCZ commented Apr 26, 2023

/unhold

@roboquat roboquat merged commit a314926 into main Apr 26, 2023
@roboquat roboquat deleted the mp/server-wsgc-increase-initial-lock-duration branch April 26, 2023 09:07
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production size/XS team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants